From 5d6162db94550a04d3d05a7d5473dbb1e5ea7086 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Sun, 8 Jun 2014 01:10:57 +0000 Subject: [PATCH] Fix netstumbler, position filter for NEWQ. Only stackfilter (which will be messy) remains. --- gpsbabel/netstumbler.cc | 7 +++---- gpsbabel/position.cc | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gpsbabel/netstumbler.cc b/gpsbabel/netstumbler.cc index a1ece3142..af11c5060 100644 --- a/gpsbabel/netstumbler.cc +++ b/gpsbabel/netstumbler.cc @@ -300,10 +300,9 @@ fix_netstumbler_dupes(void) #if NEWQ // Why, oh, why is this format running over the entire waypoint list and // modifying it? This seems wrong. -// extern QList waypt_list; -// foreach(Waypoint* waypointp, waypt_list) { -// bh->wpt = waypointp; - if (false) { + extern QList waypt_list; + foreach(Waypoint* waypointp, waypt_list) { + bh->wpt = waypointp; #else queue* elem, *tmp; extern queue waypt_head; diff --git a/gpsbabel/position.cc b/gpsbabel/position.cc index 998c1f43e..3af01914d 100644 --- a/gpsbabel/position.cc +++ b/gpsbabel/position.cc @@ -85,8 +85,13 @@ position_runqueue(queue* q, int nelems, int qtype) comp = (Waypoint**) xcalloc(nelems, sizeof(*comp)); qlist = (int*) xcalloc(nelems, sizeof(*qlist)); +#if NEWQ + foreach(Waypoint* waypointp, waypt_list) { + comp[i] = waypointp; +#else QUEUE_FOR_EACH(q, elem, tmp) { comp[i] = (Waypoint*)elem; +#endif qlist[i] = 0; i++; } -- 2.30.2